<!DOCTYPE html>
<html ng-app="gitchain" lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Gitchain</title>

    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body ng-controller="MainController">

    <div class="container">
      <div class="panel panel-default">
        <div class="panel-body">
          <div class="pull-left"><h1>Gitchain</h1></div>
          <div class="nav pull-right">
            Private key
            <select ng-model="mainPrivateKey" ng-options="key for key in privateKeys">
            </select>
          </div>
        </div>
      </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">Debug</h3>
      </div>
      <div class="panel-body">
        <table class="table table-striped table-hover table-condensed">
          <tr>
            <th>Parameter</th>
            <th>Value</th>
            <th>Description</th>
          </tr>
          <tr>
            <td><b>NumGoroutine</b></td>
            <td>{{info.Debug.NumGoroutine}}</td>
            <td>Number of concurrent processes in the node</td>
          </tr>
        </table>
      </div>
    </div>

    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title">Blocks</h3>
      </div>
      <div class="panel-body">
        <table class="table table-striped table-hover table-condensed">
          <tr>
            <th>Hash</th>
            <th>Transactions</th>
          </tr>
          <tr class="transaction-announce" ng-repeat="block in blocks track by block.Hash">
            <td><gc-block>{{block.Hash}}</gc-block></td>
            <td>{{block.NumTransactions}}</td>
          </tr>
        </table>
      </div>
      <div class="panel-footer">
        Last block: <gc-block>{{info.LastBlock.Hash || '00000000000000000000000000000000'}}</gc-block>
      </div>
    </div>

      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title">Miners</h3>
        </div>
        <div class="panel-body">
          <table class="table table-striped table-hover table-condensed">
            <tr>
              <th>ID</th>
              <th>Start time</th>
              <th>Transactions</th>
            </tr>
            <tr ng-repeat="(id, miner) in info.Mining.Miners">
              <td>{{id}}</td>
              <td>{{miner.StartTime}}</td>
              <td>{{miner.NumTransactions}}</td>
            </tr>
          </table>
        </div>
        <div class="panel-footer">
          {{info.Mining.BlocksMined}} <ng-pluralize count="info.Mining.BlocksMined" when="{'0': 'blocks', '1': 'block', 'other': 'blocks'}"></ng-pluralize> mined since startup
        </div>
      </div>

      <div class="footer">
      </div>

    </div><!-- /.container -->


    <script src="/jsonrpc.js" type="text/javascript"></script>
    <script src="/notify.min.js" type="text/javascript"></script>
    <script src="/bootbox.min.js" type="text/javascript"></script>
    <script src="/application.js" type="text/javascript"></script>
    <script src="/underscore-min.js" type="text/javascript"></script>

  </body>
</html>
